package csc.fresher.factory;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import csc.fresher.constant.ProjectBankingConstant;
import csc.fresher.dao.InterestRateDao;
import csc.fresher.dao.impl.SavingInterestRateDaoImpl;

@Component
public class InterestRateDaoFactory {
	@Resource
	SavingInterestRateDaoImpl savingInterestRateDaoImpl;
	
	public InterestRateDao getType(byte accountType){
		switch (accountType) {
		case ProjectBankingConstant.SAVING_ACCOUNT_TYPE:
			return savingInterestRateDaoImpl;
		case ProjectBankingConstant.DEPOSIT_ACCOUNT_TYPE:
			return null;
		default:
			return null;
		}
	}
}
